package com.ysx;

import com.ysx.job.DelayInvoiceHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.ParseException;

/**
 * @Classname YeshuxiangApp
 * @Description TODO
 * @Date 2021/11/21 17:38
 * @Author yyy
 */
@SpringBootApplication
@RestController
public class YeshuxiangApp {
    public static void main(String[] args) {
        SpringApplication.run(YeshuxiangApp.class,args);
    }

    @Autowired
    private DelayInvoiceHandler delayInvoiceHandler;

    @GetMapping("/delay")
    public void delayInvoice() throws InterruptedException, ParseException {
        delayInvoiceHandler.insertDelayInvoiceStatus();
//        Thread.sleep(1000);
        System.out.println("修改了");
        delayInvoiceHandler.updateDelayInvoiceStatus();
    }

}
